#ifndef _ANSWER_H_
#define _ANSWER_H_

const char gold_color[] = "dab273-000000";
const char white_color[] = "eaeaea-000000";
const UINT answer_port = 6000;
const UINT broadcast_port = 6001;

class GameFrame
{
public:
	GameFrame()
	{
		hWnd = NULL;
	}
	HWND	hWnd;
	CRect	Rect;
	CString szCaption;

	long Capture(CString file);
	long FindStr(CString string, CString color_format, int sim, int &intX, int &intY);
	long LeftClick(CString string, CString color_format, int sim = 1);
};

void CheckAnswer();
HWND CheckGame();
void CheckQuestion();
char GetQuestionKey();
bool IsQuestionShow();
HWND FindGame();
void ReCheckAnswer();
int SendQuestion();
void AskServerIP();
void OnReceiveAnswer(class CAnswerClient *socket, int nErrorCode);
void OnReceiveServerIP(class CAnswerClient *socket, int nErrorCode);

#endif
